home *** CD-ROM | disk | FTP | other *** search
/ Internet Tools (InfoMagic) / Internet Tools.iso / ip / trace / tcpdump / tcpdump-3.0.patch1.Z / tcpdump-3.0.patch1
Text File  |  1994-10-07  |  1KB  |  47 lines

  1. To: vgoel@dis.ist.ucf.edu (Vineet Goel)
  2. Reply-To: tcpdump@ee.lbl.gov
  3. Cc: tcpdump@ee.lbl.gov
  4. In-reply-to: Your message of Tue, 28 Jun 94 12:12:11 EDT.
  5. Date: Wed, 31 Aug 94 22:42:26 PDT
  6. From: Craig Leres <leres>
  7.  
  8. >   I am compiling tcpdump-3.0 on Sunos-4.1.2.  It gives following error:
  9. [...]
  10. > os.h:61: conflicting types for `malloc'
  11. > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.5.8/include/stdlib.h:38: previous declaration of `malloc'
  12. > os.h:68: conflicting types for `read'
  13. > /usr/local/lib/gcc-lib/sparc-sun-sunos4.1.2/2.5.8/include/unistd.h:120: previous declaration of `read'
  14. > tcpdump.c: In function `lookup_printer':
  15.  
  16. It looks like gcc 2 has changed the prototypes for malloc() and read().
  17. Please try the appended patch.
  18.  
  19.         Craig
  20. ------
  21. *** os-sunos4.h.virgin    Wed Aug 31 16:25:39 1994
  22. --- os-sunos4.h    Wed Aug 31 16:39:46 1994
  23. ***************
  24. *** 58,64 ****
  25. --- 58,66 ----
  26.   int    ioctl(int, int, caddr_t);
  27.   off_t    lseek(int, off_t, int);
  28.   #ifdef __GNUC__
  29. + #if __GNUC__ == 1
  30.   void    *malloc(u_int);
  31. + #endif
  32.   #else
  33.   char    *malloc(u_int);
  34.   #endif
  35. ***************
  36. *** 65,71 ****
  37. --- 67,75 ----
  38.   void    perror(const char *);
  39.   int    printf(const char *, ...);
  40.   int    puts(const char *);
  41. + #if __GNUC__ <= 1
  42.   int    read(int, char *, u_int);
  43. + #endif
  44.   int    setlinebuf(FILE *);
  45.   int    socket(int, int, int);
  46.   int    sscanf(char *, const char *, ...);
  47.